﻿using System.ServiceModel;

namespace Contract
{
    /// <summary>
    /// WCF Service contract
    /// </summary>
    /// <remarks>
    /// Notice that there are no special attributes on this class to make automatic logging work
    /// </remarks>
    [ServiceContract]
    public interface IMath
    {
        /// <summary>
        /// Adds two integer together
        /// </summary>
        /// <param name="x">First integer</param>
        /// <param name="y">Second integer</param>
        /// <returns>The sum of the first and second integers</returns>
        [OperationContract]
        int Add(int x, int y);

        /// <summary>
        /// Divides two integers
        /// </summary>
        /// <param name="x">First integer</param>
        /// <param name="y">Second integer</param>
        /// <returns>The result of dividing the first integer by the second integer</returns>
        [OperationContract]
        float Divide(int x, int y);

        /// <summary>
        /// A trite sample function to illustrate how parameter masking might work
        /// </summary>
        /// <param name="ssn">A parameter with a name that makes it a candidate for masking</param>
        /// <returns>An integer</returns>
        [OperationContract]
        int CalculateNetWorth(string ssn);
    }
}
